import Mock from "mockjs";
const Random = Mock.Random;
Mock.mock("/user", {
  "data|6": [
    {
      name: Random.cname(),
      age: Random.natural(3, 80),
      data: Random.date("yyyy-MM-dd"),
      address: Random.county(true),
    },
  ],
});

Mock.mock("/login", "post", {
  error_code: 0,
  data: [
    {
      // 用户id
      id: 1,
      // 用户角色
      role: "管理员",
      //用户名
      username: "admin",
      // 用户密码
      password: "123456",
      token: "123",
      // 禁用状态
      state: true,
      // 路由信息
      permissionRouteNames: ["user", "user-list", "house-list", "house-manage"],
    },
    {
      id: 2,
      role: "房东",
      username: "zs",
      password: "123456",
      token: "124",
      state: true,
    },
    {
      id: 3,
      role: "租客",
      username: "ls",
      password: "123456",
      token: "125",
      state: true,
    },
    {
      id: 4,
      role: "租客",
      username: "ww",
      password: "123456",
      token: "126",
      state: false,
    },
  ],
});
